<template>
    <div class="con">
        <div class="btn">
            <van-button type="primary" v-if="flag1" round size="large"   @click="tomateriel()">物料列表</van-button> <br/>
            <van-button type="primary" v-if="flag1" round size="large"   @click="toInspection()">每日巡检</van-button>
            <van-button type="primary" v-if="flag2" round size="large"   @click="toGoods()">物资申请</van-button> 
            
        </div>
    </div>
</template>
<script>
export default {
    data(){
        return{
            flag1:true,
            flag2:true,
          
        }
    },
    mounted(){
        console.log(this.$route.query.flag)
        if(this.$route.query.flag == 101){
            this.flag = true
            this.flag2 = false
        }else if(this.$route.query.flag == 102){
            this.flag = false
            this.flag2 = true
        }else if(this.$route.query.flag == 103){
            this.flag = true
            this.flag2 = true
        }
    },
    methods:{
        tomateriel(){
            this.$router.push('/materiel')
        },
         toInspection(){
            this.$router.push('/Inspection')
        },
        toGoods(){
            this.$router.push('/goods')
        }
    }
}
</script>
<style lang="scss" scoped>
.con{
    background-size: 100% 100%;
    width: 100%;
    height:100vh;
    background-image : url('../../assets/img/4.jpg');
    background-size: cover;
    background-position: -37px 0px;
}
.btn{
   
    position: absolute;
    top: 70% ;
    left:140px;
}
.van-button{
    width:120px;
    margin-bottom: 20px;

}
.list{
    margin: 20px 0px;
}
    
</style>